<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        /* 设置HTML 和body属性为100%，主要是把它当作HEAET的父级容器，让心居中 */
        body {
            background-color: pink;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;

        }

        .heart {
            width: 200px;
            height: 200px;
            background-color: red;
            position: relative;
            transform: rotate(45deg);
            animation: heartbit 1s alternate infinite;
            box-shadow: 0 0 30px red;
        }

        .heart::before {
            content: "";
            width: 200px;
            height: 100px;
            background-color: red;
            position: absolute;
            top: -100px;
            left: 0px;
            border-radius: 100px 100px 0px 0px;
            box-shadow: 0 0 30px red;


        }

        .heart::after {
            content: "";
            width: 100px;
            height: 200px;
            background-color: red;
            position: absolute;
            top: 0px;
            left: -100px;
            border-radius: 100px 0px 0px 100px;
            box-shadow: 0 0 30px red;
        }

        /* 让心跳动起来 */
        @keyframes heartbit {
            0% {
                transform: rotate(45deg);
                scale: 0, 6;

            }

            100% {
                transform: rotate(45deg);
                scale: 1.4;

            }
        }

        p {
            transform: rotate(-45deg);
            text-align: center;
            position: absolute;
            left: -26px;
            top: 35px;
        }
    </style>
</head>

<body>
    <div class="heart">
        <p>Today is December eighth Happy birthday chenxu I love you ! </p>
     
    </div>
<img src="1.png" alt="">
</body>

</html>